﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SilkeyERP.BL.Controller
{
    public class TaxFigureController : NAGFwk.BL.IBaseController<Model.TaxFigure>
    {
        private SilkeyERP.Model.Repository.ITaxFigureRepository Repository;

        public TaxFigureController()
        {
            this.Repository = new Model.Repository.TaxFigureRepository();
        }

        public TaxFigureController(SilkeyERP.Model.Repository.TaxFigureRepository _Repository)
        {            
            this.Repository = _Repository;
        }

        public IEnumerable<Model.TaxFigure> GetAll()
        {
            return Repository.GetAll().ToList();
        }

        public void Insert(Model.TaxFigure Obj)
        {
            //Obj.Enable = true;
            Repository.Insert(Obj);
        }

        public void Delete(int ID)
        {
            Repository.Delete(ID);
        }

        public void DeleteLogical(int ID)
        {
            Repository.DeleteLogical(ID);
        }

        public void Update(Model.TaxFigure Obj)
        {
            Repository.Update(Obj);
        }

        public void Dispose()
        {
            Repository.Dispose();
        }

        public Model.TaxFigure GetByID(int ID)
        {
            return Repository.GetByID(ID);
        }




        public void Delete(Model.TaxFigure Obj)
        {
            Delete(Obj.TaxFigureID);
        }

        public void DeleteLogical(Model.TaxFigure Obj)
        {
            DeleteLogical(Obj.TaxFigureID);
        }
    }
}
